package com.jnks.controller;


import com.jnks.constant.R;
import com.jnks.pojo.domain.vo.WhiteDroneReqVo;
import com.jnks.service.CompanyWhitelistDroneTService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * 白名单管理
 */
@RestController
@RequestMapping("/vehicle/whiteDrone")
public class WhiteDroneController{
    @Autowired
    private CompanyWhitelistDroneTService companyWhitelistDroneTService;

    /**
     * 注册白名单无人机
     */
    @PostMapping(value = "/insert")
    public R insertOrUpdate(@RequestBody WhiteDroneReqVo vo) {
        return companyWhitelistDroneTService.insertOrUpdate(vo);
    }

    /**
     * 删除白名单无人机
     */
    @PostMapping(value = "/delete")
    public R delete(@RequestParam Integer id) {
        return companyWhitelistDroneTService.delete(id);
    }

    /**
     * 白名单列表展示
     */
    @PostMapping(value = "/queryDroneByPage")
    public R queryDroneByPage() {
        return companyWhitelistDroneTService.queryDroneByPage();
    }

}
